x_max = 2*pi;
N = 200;
mu = [-1.2,-1.0,-0.8,-0.6,-0.4];
max_iter = round(-N./mu);
numfine = 4;
a = 1;

stable_leapfrog_errmax1 = zeros(1,numfine+1);
for i = 1:numfine+1
    u = initial_data1(N,x_max);
    u = stable_leapfrog(u,N,mu(i),x_max,a,max_iter(i));
    exact_u = exact_solution1(N,mu(i),x_max,a,max_iter(i));
    stable_leapfrog_errmax1(i) = err(u,exact_u,2,x_max);
end
disp(stable_leapfrog_errmax1(1));
disp(stable_leapfrog_errmax1(2));
disp(stable_leapfrog_errmax1(3:end));